use strict;
use warnings;

my @ovsf = ([1]);
my @tmp; my @tmp1;

# generacja wszytkich 64-bitowych ovsf
for my $i ( 0 .. 5 ) {
	@tmp = ();
	for my $ov (@ovsf) {
		@tmp1 = ();
		push @tmp, [ @$ov, @$ov ];
		for (@$ov) {
			($_ == 1) and push @tmp1, 0;
			($_ == 0) and push @tmp1, 1;		
		}
		push @tmp, [ @$ov, @tmp1 ];			
	}
	@ovsf = @tmp;
}

# zapis ovsf do pliku ovsf_64
open FH, "> data/ovsf_64";
for my $ovsf (@ovsf) {
	@$ovsf[$_] == 0 and @$ovsf[$_] = -1 for ( 0 .. 63 );
	print FH "@$ovsf \n";
}
close FH;

